<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template/template2.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateFunctionTitle}"></h:outputText>
        </ui:define>
        <ui:define name="content">
            <div class="panel-wrapper fixed">
                <ul class="breadcrumbs-navigation">
                    <li><h:link outcome="List">Dashboard</h:link></li>
                    <li><h:link outcome="List">Function Management</h:link></li>

                </ul>
            </div>

            <div class="panel-wrapper fixed">
                <div id="msg_error">

                </div>
                <div class="panel ">
                    <div class="title">
                        <h4>Create Function</h4>
                    </div>
                    <div class="content">
                        <h:form>
                            <h:panelGroup id="messagePanel" layout="block">
                                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
                            </h:panelGroup>
                            <h:dataTable value="#{functionController.items}" var="item" border="0" cellpadding="2" cellspacing="0" rowClasses="jsfcrud_odd_row,jsfcrud_even_row" rules="all" style="border:1px solid #DDDDDD">
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListFunctionTitle_functionId}"/>
                            </f:facet>
                            <h:outputText value="#{item.functionId}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListFunctionTitle_functionname}"/>
                            </f:facet>
                            <h:outputText value="#{item.functionname}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListFunctionTitle_url}"/>
                            </f:facet>
                            <h:outputText value="#{item.url}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="Actions"/>
                            </f:facet>
                             <h:form>
                                    <h:commandLink action="#{functionController.prepareEdit}" class="icon"><img src="#{facesContext.externalContext.request.contextPath}/resources/_layout/images/icons/icon-edit.png" alt="Edit"/></h:commandLink>
                                    <h:commandLink action="#{functionController.destroy}" class="icon"><img src="#{facesContext.externalContext.request.contextPath}/resources/_layout/images/icons/icon-delete.png" alt="Delete"/></h:commandLink>
                                </h:form>
                            
                        </h:column>
                    </h:dataTable>
                        </h:form>
                    </div>
                </div>
            </div>
        </ui:define>
    </ui:composition>
</html>

